package com.lsyw.intergrate.serviceImpl;

import cn.dev33.satoken.stp.StpUtil;
import com.lsyw.intergrate.entity.SysUser;
import com.lsyw.intergrate.mapper.SysUserMapper;
import com.lsyw.intergrate.service.SysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author 刘磊
 * @since 2023-04-21
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;



    @Override
    public SysUser getLoginUser() {
        String loginId = StpUtil.getLoginIdAsString();
        SysUser loginUser = this.getById(loginId);
        return loginUser;
    }

}
